import fetch from '@/utils/fetch';

function request({method,url,data,params}){
    return fetch(method,url, data,params)
}
// 查询列表
export const searchApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/moldDevice/getDeviceTzList',
        data: params
    })
}
//获取已经关联的列表
export const getLinkList = (params) => {
    return request({
        method: 'post',
        url: '/dms/moldDevice/getDeviceList',
        data: params
    })
}


//获取未已经关联的列表
export const getDeviceNoList = (params) => {
    return request({
        method: 'post',
        url: '/dms/moldDevice/getDeviceNoList',
        data: params
    })
}

// 编辑
export const editApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/moldinfo/updateMMoldInfo',
        data: params
    })
}

// 删除
export const deleteApi = (params) => {
    return request({
        method: 'post',
        url: '/dms/moldDevice/deleteByIds',
        data: params
    })
}
//批量关联
export const devicesAssociated = (params) => {
    return request({
        method: 'post',
        url: '/dms/moldDevice/devicesAssociated',
        data: params
    })
}

